<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 找出数组内最⼤的素数 -->
    <SCRipt>
        var a = [1,2,3,47,11,6,19,8,50];
        var b = [];
        for(var i = 0 ; i< a.length ; i++){
            if(a[i]>b){
            b=a[i]
            }
        }
        alert(b)
    </SCRipt>
</body>
</html>